@import url(./header.css);
@import url(./footer.css);

.banner {
    width: 100%;
}

.banner img {
    width: 100%;
    object-fit: contain;
}

.main {
    min-height: 90vh;
}

.cards {
    display: grid;
    grid-gap: 4vmin;
    justify-content: center;
    width: 100%;
    max-width: 1130px;
    margin: 0 auto;
    padding: 4vmin;
}

.card {
    box-shadow: 0px 0px 10px #e0e0e0;
    transition: box-shadow 400ms ease-in-out;
}

.card-top .card-img {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding-bottom: 100%;
}

.card-top .card-img img {
    position: absolute;
    top: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.card-top .card-info {
    display: flex;
    flex-direction: column;
    padding: 4vmin;
}

.card-top .card-info .card-info-title {
    font-size: 5vmin;
    font-weight: bold;
}

.card-top .card-info .card-info-desc {
    font-size: 3.225vmin;
}

.card-top .card-info .card-info-tips {
    font-size: 3.225vmin;
    color: #999999;
    padding-top: 1vmin;
}

.card-bottom {
    position: relative;
    width: 100%;
    height: 12vmin;
    background-color: #f8f9f9;
}

.card-bottom .card-name {
    position: absolute;
    top: 50%;
    transform: translate(3vmin, -50%);
    font-size: 4vmin;
}

.card-bottom .card-btn {
    position: absolute;
    top: 50%;
    right: 0;
    transform: translate(-1vmin, -50%);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20vmin;
    height: 8vmin;
    background-color: #6dbdd6;
    border: 2px solid #6dbdd6;
    font-size: 3.5vmin;
    border-radius: 9999px;
    color: #ffffff;
    cursor: pointer;
}

@media screen and (min-width: 768px) {
    .cards {
        grid-template-columns: repeat(2, 1fr);
        grid-gap: 30px;
    }

    .card:hover {
        box-shadow: 0px 0px 10px #858585;
    }

    .card-top {
        display: flex;
    }

    .card-top .card-img {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 140px;
        height: 140px;
        padding-bottom: 0;
    }

    .card-top .card-img img {
        width: 100%;
        object-fit: contain;
    }

    .card-top .card-info {
        display: flex;
        flex-direction: column;
        flex: 1;
        padding: 15px;
    }

    .card-top .card-info .card-info-title {
        font-size: 16px;
    }

    .card-top .card-info .card-info-desc {
        max-width: 350px;
        display: -webkit-box;
        -webkit-box-orient: vertical;
        overflow: hidden;
        text-overflow: ellipsis;
        -webkit-line-clamp: 2; /* 控制显示的行数 */
        font-size: 13px;
    }

    .card-top .card-info .card-info-tips {
        font-size: 13px;
        padding-top: 3px;
    }

    .card-bottom {
        width: 100%;
        height: 50px;
    }

    .card-bottom .card-name {
        font-size: 16px;
    }

    .card-bottom .card-btn {
        width: 85px;
        height: 38px;
        font-size: 14px;
        transition: background-color 300ms ease-in-out;
    }

    .card-bottom .card-btn:hover {
        background-color: #b71427;
    }


}

